﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.NhaSanXuat"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class NhaSanXuatEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the IDNhaSanXuat property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIDNhaSanXuat;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IDNhaSanXuat property.
		/// </summary>
		protected System.Windows.Forms.Label uxIDNhaSanXuatLabel;
		
		/// <summary>
		/// TextBox for the Ten property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxTen;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Ten property.
		/// </summary>
		protected System.Windows.Forms.Label uxTenLabel;
		
		/// <summary>
		/// TextBox for the TenVietTat property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxTenVietTat;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the TenVietTat property.
		/// </summary>
		protected System.Windows.Forms.Label uxTenVietTatLabel;
		
		/// <summary>
		/// TextBox for the MoTa property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxMoTa;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the MoTa property.
		/// </summary>
		protected System.Windows.Forms.Label uxMoTaLabel;
		
		/// <summary>
		/// CheckBox for the TrangThai property.
		/// </summary>
		protected System.Windows.Forms.CheckBox uxTrangThai;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the TrangThai property.
		/// </summary>
		protected System.Windows.Forms.Label uxTrangThaiLabel;
		
		/// <summary>
		/// TextBox for the HinhMinhHoa property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxHinhMinhHoa;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the HinhMinhHoa property.
		/// </summary>
		protected System.Windows.Forms.Label uxHinhMinhHoaLabel;
		
		/// <summary>
		/// DataTimePicker for the ThoiDiemChinhSua property.
		/// </summary>
		protected System.Windows.Forms.DateTimePicker uxThoiDiemChinhSua;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ThoiDiemChinhSua property.
		/// </summary>
		protected System.Windows.Forms.Label uxThoiDiemChinhSuaLabel;
		
		/// <summary>
		/// DataTimePicker for the ThoiDiemCapNhat property.
		/// </summary>
		protected System.Windows.Forms.DateTimePicker uxThoiDiemCapNhat;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ThoiDiemCapNhat property.
		/// </summary>
		protected System.Windows.Forms.Label uxThoiDiemCapNhatLabel;
		#endregion
		
		#region Main entity
		private Entities.NhaSanXuat _NhaSanXuat;
		/// <summary>
		/// Gets or sets the <see cref="Entities.NhaSanXuat"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.NhaSanXuat"/> instance.</value>
		public Entities.NhaSanXuat NhaSanXuat
		{
			get {return this._NhaSanXuat;}
			set
			{
				this._NhaSanXuat = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxIDNhaSanXuat.DataBindings.Clear();
			this.uxIDNhaSanXuat.DataBindings.Add("Text", this.uxBindingSource, "IDNhaSanXuat", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTen.DataBindings.Clear();
			this.uxTen.DataBindings.Add("Text", this.uxBindingSource, "Ten", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTenVietTat.DataBindings.Clear();
			this.uxTenVietTat.DataBindings.Add("Text", this.uxBindingSource, "TenVietTat", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxMoTa.DataBindings.Clear();
			this.uxMoTa.DataBindings.Add("Text", this.uxBindingSource, "MoTa", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTrangThai.DataBindings.Clear();
			this.uxTrangThai.DataBindings.Add("Checked", this.uxBindingSource, "TrangThai", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxHinhMinhHoa.DataBindings.Clear();
			this.uxHinhMinhHoa.DataBindings.Add("Text", this.uxBindingSource, "HinhMinhHoa", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxThoiDiemChinhSua.DataBindings.Clear();
			this.uxThoiDiemChinhSua.DataBindings.Add("Value", this.uxBindingSource, "ThoiDiemChinhSua", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxThoiDiemCapNhat.DataBindings.Clear();
			this.uxThoiDiemCapNhat.DataBindings.Add("Value", this.uxBindingSource, "ThoiDiemCapNhat", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="NhaSanXuatEditControlBase"/> class.
		/// </summary>
		public NhaSanXuatEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_NhaSanXuat != null) _NhaSanXuat.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxIDNhaSanXuat = new System.Windows.Forms.TextBox();
			uxIDNhaSanXuatLabel = new System.Windows.Forms.Label();
			this.uxTen = new System.Windows.Forms.TextBox();
			uxTenLabel = new System.Windows.Forms.Label();
			this.uxTenVietTat = new System.Windows.Forms.TextBox();
			uxTenVietTatLabel = new System.Windows.Forms.Label();
			this.uxMoTa = new System.Windows.Forms.TextBox();
			uxMoTaLabel = new System.Windows.Forms.Label();
			this.uxTrangThai = new System.Windows.Forms.CheckBox();
			uxTrangThaiLabel = new System.Windows.Forms.Label();
			this.uxHinhMinhHoa = new System.Windows.Forms.TextBox();
			uxHinhMinhHoaLabel = new System.Windows.Forms.Label();
			this.uxThoiDiemChinhSua = new System.Windows.Forms.DateTimePicker();
			uxThoiDiemChinhSuaLabel = new System.Windows.Forms.Label();
			this.uxThoiDiemCapNhat = new System.Windows.Forms.DateTimePicker();
			uxThoiDiemCapNhatLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIDNhaSanXuatLabel
			//
			this.uxIDNhaSanXuatLabel.Text = "IDNhaSanXuat:";
			this.uxIDNhaSanXuatLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIDNhaSanXuatLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDNhaSanXuatLabel);			
			//
			// uxIDNhaSanXuat
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDNhaSanXuat);
			this.uxIDNhaSanXuat.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxIDNhaSanXuat);
			//
			// uxTenLabel
			//
			this.uxTenLabel.Text = "Ten:";
			this.uxTenLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxTenLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTenLabel);			
			//
			// uxTen
			//
			this.uxTen.Width = 250;
			this.uxTen.MaxLength = 1024;
			//this.uxTableLayoutPanel.Controls.Add(this.uxTen);
			this.uxTen.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxTen);
			//
			// uxTenVietTatLabel
			//
			this.uxTenVietTatLabel.Text = "TenVietTat:";
			this.uxTenVietTatLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxTenVietTatLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTenVietTatLabel);			
			//
			// uxTenVietTat
			//
			this.uxTenVietTat.Width = 250;
			this.uxTenVietTat.MaxLength = 50;
			//this.uxTableLayoutPanel.Controls.Add(this.uxTenVietTat);
			this.uxTenVietTat.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxTenVietTat);
			//
			// uxMoTaLabel
			//
			this.uxMoTaLabel.Text = "MoTa:";
			this.uxMoTaLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxMoTaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxMoTaLabel);			
			//
			// uxMoTa
			//
			this.uxMoTa.Width = 250;
			this.uxMoTa.MaxLength = 16;
			//this.uxTableLayoutPanel.Controls.Add(this.uxMoTa);
			this.uxMoTa.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxMoTa);
			//
			// uxTrangThaiLabel
			//
			this.uxTrangThaiLabel.Text = "TrangThai:";
			this.uxTrangThaiLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxTrangThaiLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTrangThaiLabel);			
			//
			// uxTrangThai
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxTrangThai);
			this.uxTrangThai.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxTrangThai);
			//
			// uxHinhMinhHoaLabel
			//
			this.uxHinhMinhHoaLabel.Text = "HinhMinhHoa:";
			this.uxHinhMinhHoaLabel.Location = new System.Drawing.Point(3, 130);
			this.Controls.Add(this.uxHinhMinhHoaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxHinhMinhHoaLabel);			
			//
			// uxHinhMinhHoa
			//
			this.uxHinhMinhHoa.Width = 250;
			this.uxHinhMinhHoa.MaxLength = 200;
			//this.uxTableLayoutPanel.Controls.Add(this.uxHinhMinhHoa);
			this.uxHinhMinhHoa.Location = new System.Drawing.Point(160, 130);
			this.Controls.Add(this.uxHinhMinhHoa);
			//
			// uxThoiDiemChinhSuaLabel
			//
			this.uxThoiDiemChinhSuaLabel.Text = "ThoiDiemChinhSua:";
			this.uxThoiDiemChinhSuaLabel.Location = new System.Drawing.Point(3, 156);
			this.Controls.Add(this.uxThoiDiemChinhSuaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemChinhSuaLabel);			
			//
			// uxThoiDiemChinhSua
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemChinhSua);
			this.uxThoiDiemChinhSua.Location = new System.Drawing.Point(160, 156);
			this.Controls.Add(this.uxThoiDiemChinhSua);
			//
			// uxThoiDiemCapNhatLabel
			//
			this.uxThoiDiemCapNhatLabel.Text = "ThoiDiemCapNhat:";
			this.uxThoiDiemCapNhatLabel.Location = new System.Drawing.Point(3, 182);
			this.Controls.Add(this.uxThoiDiemCapNhatLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemCapNhatLabel);			
			//
			// uxThoiDiemCapNhat
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemCapNhat);
			this.uxThoiDiemCapNhat.Location = new System.Drawing.Point(160, 182);
			this.Controls.Add(this.uxThoiDiemCapNhat);
			// 
			// NhaSanXuatEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "NhaSanXuatEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
